const connec = require('mongoose');

const parameter = require('./config')

connec.connect(parameter.mongodb, {useNewUrlParser: true, useUnifiedTopology: true})
var db = connec.connection;
db.on('error', function (err) {
    console.log(err + "数据库连接失败");
});
db.once('open', function () {
    console.log("数据库连接成功");
});